/*
 * Copyright (c) 2024-2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "securec.h"
#include "hctest.h"
#include "cmsis_os2.h"
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include "cJSON.h"

#include "iotc_conf.h"
#include "iotc_def.h"
#include "iotc_errcode.h"
#include "iotc_event.h"
#include "iotc_prof_def.h"
#include "iotc_oh_device.h"
#include "iotc_oh_sdk.h"
#include "utils_common.h"

#define ONE_THOUSAND 1000

static bool g_iotcInitalizedEvent = false;

static void TestIotcEventCallback(int32_t event)
{
    if (event == IOTC_CORE_COMM_EVENT_MAIN_INITIALIZED) {
        g_iotcInitalizedEvent = true;
    }
}

static void ClearIotcInitivalized(void)
{
    g_iotcInitalizedEvent = false;
}

static int WaitIotcInitivalized(void)
{
    int cnt = ONE_THOUSAND;
    while (cnt > 0) {
        if (g_iotcInitalizedEvent) {
            return IOTC_OK;
        }
        cnt--;
        sleep(1);
    }
    return IOTC_ERROR;
}

static bool g_iotcInitalizedEvent2 = false;

static void TestIotcEventCallback2(int32_t event)
{
    if (event == IOTC_CORE_COMM_EVENT_MAIN_INITIALIZED) {
        g_iotcInitalizedEvent2 = true;
    }
}

static void ClearIotcInitivalized2(void)
{
    g_iotcInitalizedEvent2 = false;
}

static int WaitIotcInitivalized2(void)
{
    int cnt = ONE_THOUSAND;
    while (cnt > 0) {
        if (g_iotcInitalizedEvent2) {
            return IOTC_OK;
        }
        cnt--;
        sleep(1);
    }
    return IOTC_ERROR;
}

static int32_t PutCharState(const IotcCharState state[], uint32_t num)
{
    return 0;
}

static int32_t GetCharState(const IotcCharState state[], char *out[], uint32_t len[], uint32_t num)
{
    return 0;
}

static int32_t ReportAll(void)
{
    return 0;
}

static int32_t GetPincode(uint8_t *buf, uint32_t bufLen)
{
    return 0;
}

static int32_t GetAcKey(uint8_t *buf, uint32_t bufLen)
{
    return 0;
}

static int32_t NoticeReboot(IotcRebootReason res)
{
    return 0;
}

int32_t DevTrng(uint8_t *buf, uint32_t len)
{
    return 0;
}

static IotcDeviceInfo g_devInfo = {
    .sn = "12345678",
    .prodId = "2F6R0",
    .subProdId = "",
    .model = "DL-01W",
    .devTypeId = "0460",
    .devTypeName = "Table Lamp",
    .manuId = "17C",
    .manuName = "DALEN",
    .devName = "One Connect Dev Name",
    .fwv = "1.0.0",
    .hwv = "1.0.0",
    .swv = "1.0.0",
    .protType = IOTC_PROT_TYPE_BLE,
};

static IotcServiceInfo g_svcInfo[] = {
    {"switch", "switch"},
};


/**
 * @tc.desc      : register a test suite, this suite is used to test function
 * @param        : subsystem name is communication
 * @param        : module name is lwip
 * @param        : test suit name is LwipFuncTestSuite
 */
LITE_TEST_SUIT(communication, iot_connect, IotcOhSdkActsTest);

/**
 * @tc.setup     : setup for every testcase
 * @return       : setup result, TRUE is success, FALSE is fail
 */
static BOOL IotcOhSdkActsTestSetUp(void)
{
    printf("IotcOhSdkActsTestSetUp \r\n");
    return TRUE;
}

/**
 * @tc.teardown  : teardown for every testcase
 * @return       : teardown result, TRUE is success, FALSE is fail
 */
static BOOL IotcOhSdkActsTestTearDown(void)
{
    printf("IotcOhSdkActsTestTearDown \r\n");
    return TRUE;
}

/**
 * @tc.name: IotcOhSdkActsTest001
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest001, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest002
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest002, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest003
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest003, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_AC_KEY_CALLBACK, GetAcKey);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, NoticeReboot);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhRestore();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhRestore();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest004
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest004, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_SDK_MNGR_ERR_MAIN_TASK_NOT_EXISTS);
}

/**
 * @tc.name: IotcOhSdkActsTest005
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest005, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest006
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest006, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_SDK_MNGR_ERR_MAIN_TASK_NOT_EXISTS);
}

/**
 * @tc.name: IotcOhSdkActsTest007
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest007, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest008
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest008, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_CORE_COMM_FWK_ERR_MAIN_ALREADY_RUNNING);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest009
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest009, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhRestore();
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest010
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest010, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    ClearIotcInitivalized();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhRestore();
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest011
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest011, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_LOG_LEVEL, IOTC_LOG_LEVEL_MIN);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest012
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest012, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_LOG_LEVEL, IOTC_LOG_LEVEL_MAX);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest013
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest013, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_LOG_LEVEL, IOTC_LOG_LEVEL_MAX);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest014
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest014, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_LOG_LEVEL, IOTC_LOG_LEVEL_NOTICE);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest015
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest015, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_LOG_LEVEL, 100);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest016
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest016, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_LOG_LEVEL, 257);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest017
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest017, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_MAIN_TASK_SIZE, 0);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest018
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest018, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_MAIN_TASK_SIZE, 32 * 1024);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest019
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest019, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_MONITOR_TASK_SIZE, 0);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest020
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest020, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_MONITOR_TASK_SIZE, 32 * 1024);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest021
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest021, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_CONFIG_PATH, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest022
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest022, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_CONFIG_PATH, "");
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest023
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest023, Function | MediumTest | Level2)
{
    int ret = 0;
    char buf[130] = {0};
    memset_s(buf, sizeof(buf), 'c', sizeof(buf) - 1);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_CONFIG_PATH, buf);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest024
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest024, Function | MediumTest | Level2)
{
    int ret = 0;
    char buf[129] = {0};
    memset_s(buf, sizeof(buf), 'c', sizeof(buf) - 1);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_CONFIG_PATH, buf);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_CONFIG_PATH, "iotc");
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest025
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest025, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest026
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest026, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_UNREG_EVENT_LISTENER, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest027
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest027, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_REG_EVENT_LISTENER, TestIotcEventCallback2);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_AC_KEY_CALLBACK, GetAcKey);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ClearIotcInitivalized2();
    ret = IotcOhMain();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized2();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ClearIotcInitivalized();
    ClearIotcInitivalized2();
    ret = IotcOhReset();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = WaitIotcInitivalized2();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhRestore();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhStop();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_UNREG_EVENT_LISTENER, TestIotcEventCallback);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_SDK_UNREG_EVENT_LISTENER, TestIotcEventCallback2);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}


/**
 * @tc.name: IotcOhSdkActsTest028
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest028, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_PUT_CHAR_STATE_CALLBACK, PutCharState);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest029
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest029, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_PUT_CHAR_STATE_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest030
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest030, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_PUT_CHAR_STATE_CALLBACK, PutCharState);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest031
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest031, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_CHAR_STATE_CALLBACK, GetCharState);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest032
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest032, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_CHAR_STATE_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest033
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest033, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_CHAR_STATE_CALLBACK, GetCharState);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest034
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest034, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REPORT_ALL_CALLBACK, ReportAll);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest035
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest035, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REPORT_ALL_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest036
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest036, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REPORT_ALL_CALLBACK, ReportAll);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest037
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest037, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_PINCODE_CALLBACK, GetPincode);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest038
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest038, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_PINCODE_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest039
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest039, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_PINCODE_CALLBACK, GetPincode);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest040
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest040, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_AC_KEY_CALLBACK, GetAcKey);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest041
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest041, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_AC_KEY_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest042
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest042, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_GET_AC_KEY_CALLBACK, GetAcKey);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest043
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest043, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DATA_FREE_CALLBACK, cJSON_free);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest044
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest044, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DATA_FREE_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest045
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest045, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DATA_FREE_CALLBACK, cJSON_free);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest046
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest046, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, NoticeReboot);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest047
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest047, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest048
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest048, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, NoticeReboot);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest049
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest049, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, DevTrng);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest050
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest050, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest051
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest051, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_REBOOT_CALLBACK, DevTrng);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest052
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest052, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest053
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest053, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, NULL);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest054
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest054, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.sn = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.sn = "12345678";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest055
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest055, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.prodId = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.prodId = "2F6R0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest056
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest056, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.subProdId = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.subProdId = "";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest057
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest057, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.model = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.model = "DL-01W";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest058
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest058, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.devTypeId = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devTypeId = "0460";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest059
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest059, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.devTypeName = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devTypeName = "Table Lamp";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest060
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest060, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.manuId = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.manuId = "17C";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest061
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest061, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.manuName = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.manuName = "DALEN";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest062
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest062, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.fwv = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.fwv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest063
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest063, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.hwv = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.hwv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest064
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest064, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.swv = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.swv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest065
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest065, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.sn = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.sn = "12345678";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest066
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest066, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_PRO_ID_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_PRO_ID_STR_LEN - 1);
    g_devInfo.prodId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.prodId = "2F6R0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest067
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest067, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.model = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.model = "DL-01W";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest068
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest068, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_DEV_TYPE_ID_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_DEV_TYPE_ID_STR_LEN - 1);
    g_devInfo.devTypeId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devTypeId = "0460";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest069
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest069, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.devTypeName = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devTypeName = "Table Lamp";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest070
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest070, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_MANU_ID_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_MANU_ID_STR_LEN - 1);
    g_devInfo.manuId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.manuId = "17C";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest071
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest071, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.manuName = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.manuName = "17C";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest072
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest072, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.fwv = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.fwv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest073
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest073, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.hwv = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.hwv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest074
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest074, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.swv = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.swv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest075
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest075, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_SN_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_SN_STR_MAX_LEN + 1);
    g_devInfo.sn = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.sn = "12345678";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest076
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest076, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_PRO_ID_STR_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_PRO_ID_STR_LEN + 1);
    g_devInfo.prodId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.prodId = "2F6R0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest077
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest077, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_MODEL_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_MODEL_STR_MAX_LEN + 1);
    g_devInfo.model = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.model = "DL-01W";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest078
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest078, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_DEV_TYPE_ID_STR_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_DEV_TYPE_ID_STR_LEN + 1);
    g_devInfo.devTypeId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devTypeId = "0460";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest079
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest079, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_DEV_TYPE_NAME_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_DEV_TYPE_NAME_STR_MAX_LEN + 1);
    g_devInfo.devTypeName = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devTypeName = "Table Lamp";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest080
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest080, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_MANU_ID_STR_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_MANU_ID_STR_LEN + 1);
    g_devInfo.manuId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.manuId = "17C";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest081
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest081, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_MANU_NAME_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_MANU_NAME_STR_MAX_LEN + 1);
    g_devInfo.manuName = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.manuName = "17C";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest082
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest082, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_FIRMWARE_VER_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_FIRMWARE_VER_STR_MAX_LEN + 1);
    g_devInfo.fwv = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.fwv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest083
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest083, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_FIRMWARE_VER_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_FIRMWARE_VER_STR_MAX_LEN + 1);
    g_devInfo.hwv = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.hwv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest084
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest084, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_FIRMWARE_VER_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_FIRMWARE_VER_STR_MAX_LEN + 1);
    g_devInfo.swv = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.swv = "1.0.0";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest085
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest085, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.protType = IOTC_PROT_TYPE_VIRTUAL + 1;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.protType = IOTC_PROT_TYPE_BLE;
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest086
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest086, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest087
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest087, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest088
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest088, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, 0);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest089
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest089, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, NULL, 1);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest090
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest090, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_svcInfo[0].svcId = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_svcInfo[0].svcId = "switch";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest091
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest091, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_svcInfo[0].svcType = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_svcInfo[0].svcType = "switch";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest092
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest092, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_svcInfo[0].svcId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_svcInfo[0].svcId = "switch";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest093
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest093, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_svcInfo[0].svcType = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_svcInfo[0].svcType = "switch";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest094
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest094, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_SVC_ID_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_SVC_ID_STR_MAX_LEN + 1);
    g_svcInfo[0].svcId = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_svcInfo[0].svcId = "switch";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest095
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest095, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_SVC_TYPE_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_SVC_TYPE_STR_MAX_LEN + 1);
    g_svcInfo[0].svcType = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_svcInfo[0].svcType = "switch";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest096
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest096, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_SVC_INFO, g_svcInfo, sizeof(g_svcInfo) / sizeof(g_svcInfo[0]));
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest097
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest097, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    g_devInfo.devName = NULL;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devName = "One Connect Dev Name";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest098
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest098, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[UTILS_MIN_STR_LEN] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', UTILS_MIN_STR_LEN - 1);
    g_devInfo.devName = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devName = "One Connect Dev Name";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

/**
 * @tc.name: IotcOhSdkActsTest099
 * @tc.desc: Test iot connect.
 * @tc.in: Test module, Test number, Test levels.
 * @tc.out: Zero
 * @tc.type: FUNC
 * @tc.require: 1
 */
LITE_TEST_CASE(IotcOhSdkActsTest, IotcOhSdkActsTest099, Function | MediumTest | Level2)
{
    int ret = 0;
    ret = IotcOhDevInit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
    char tmpStr[IOTC_OH_DEV_NAME_STR_MAX_LEN + 2] = {0};
    (void)memset_s(tmpStr, sizeof(tmpStr), 0, sizeof(tmpStr));
    (void)memset_s(tmpStr, sizeof(tmpStr), 'c', IOTC_OH_DEV_NAME_STR_MAX_LEN + 1);
    g_devInfo.devName = tmpStr;
    ret = IotcOhSetOption(IOTC_OH_OPTION_DEVICE_DEV_INFO, &g_devInfo);
    TEST_ASSERT_NOT_EQUAL(ret, IOTC_OK);
    g_devInfo.devName = "One Connect Dev Name";
    ret = IotcOhDevDeinit();
    TEST_ASSERT_EQUAL_INT(ret, IOTC_OK);
}

RUN_TEST_SUITE(IotcOhSdkActsTest);